package org.hackystat.iw.projectoverviewer.page;

import java.util.Properties;
import org.apache.wicket.util.tester.WicketTester;
import org.hackystat.iw.projectoverviewer.ProjectOverviewerApplication;
import org.hackystat.iw.projectoverviewer.ProjectOverviewerProperties;
import org.hackystat.iw.projectoverviewer.test.ProjectOverviewerTestHelper;
import org.junit.Test;

/**
 * Tests the base page.
 * 
 * @author Jianfei Liao
 * @author Nathan Britton
 */
public class TestBasePage extends ProjectOverviewerTestHelper {
  
  /**
   * Tests the base page.
   */
  @Test
  public void testBasePage() { // NOPMD
    Properties invalidProperties = new Properties();
    invalidProperties.put(ProjectOverviewerProperties.SENSORBASE_HOST_KEY, "http://localhost/");
    
    // do not use test properties so it covers exception case
    // normal case would be tested in other pages
    WicketTester tester = new WicketTester(new ProjectOverviewerApplication(invalidProperties));
    tester.startPage(BasePage.class);
    
    tester.assertRenderedPage(BasePage.class);
  }
}